home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / dosguide.exe / HELPDOS.ZIP / FOR.HLP < prev    next >
Text File  |  1985-09-03  |  908b  |  24 lines

  1. ----------------------  FOR - Internal Batch Subcommand  -----------------------
  2.  
  3. FOR allows you to execute the same DOS command for each of a group of files.
  4.  
  5. FORMAT:   FOR %%variable IN (set) DO command
  6.  
  7. REMARKS:
  8.  
  9.    %%variable - sequentially assigned to each file in "set" to allow "command"
  10.                 to be performed for each file.  "Variable" must be a single
  11.                 letter.
  12.    set        - is one or more file specifications of the form d:filename.ext.
  13.                 Global characters (* and ?) are allowed.  Path names are not
  14.                 allowed.
  15.    command    - the DOS command to be performed for each file in "set."   The
  16.                 command cannot be another FOR Subcommand.
  17.  
  18. EXAMPLE:
  19.  
  20. The following batch file displays (via the TYPE command) the contents of the
  21. files FILE1, FILE2 and FILE3:
  22.  
  23.           FOR %%f IN (file1 file2 file3) DO TYPE %%f
  24.